import request from '@/utils/request';

// 查询售后列表
export function listAftersale(query) {
	return request({
		url: '/mall/aftersale/list',
		method: 'post',
		data: query,
	});
}

// 查询售后详细
export function getAftersale(id) {
	return request({
		url: '/mall/aftersale/getInfo',
		method: 'post',
		data: { id: id },
	});
}

// 新增售后
export function addAftersale(data) {
	return request({
		url: '/mall/aftersale/add',
		method: 'post',
		data: data,
	});
}

// 编辑售后
export function updateAftersale(data) {
	return request({
		url: '/mall/aftersale/edit',
		method: 'post',
		data: data,
	});
}

// 删除售后
export function delAftersale(id) {
	return request({
		url: '/mall/aftersale/remove',
		method: 'post',
		data: { id: id },
	});
}

// 导出售后
export function exportAftersale(query) {
	return request({
		url: '/mall/aftersale/export',
		method: 'post',
		params: query,
	});
}
